using System;
using System.Collections.Generic;
using System.Text;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace MosziNET.Web.Gallery.Template
{
    /// <summary>
    /// Returns the template used for displaying a folder in the gallery
    /// </summary>
    internal class FolderTemplate : ITemplate
    {
        string cssClass;

        /// <summary>
        /// Creates a new instance of the FolderTemplate object
        /// </summary>
        /// <param name="cssClass"></param>
        public FolderTemplate(string cssClass)
        {
            this.cssClass = cssClass;
        }

        #region / ITemplate Members /

        /// <summary>
        /// Instanciates the controls
        /// </summary>
        /// <param name="container"></param>
        public void InstantiateIn(Control container)
        {
            container.Controls.Add(new FolderControl(this.cssClass));
        }

        #endregion / ITemplate Members /
    }
}
